#ifndef TRIANGLE_H_
#define TRIANGLE_H_
#include "shape.h"
#include <cmath>
#include <iostream>
class Triangle : virtual public Shape {
private:
  double a, b, c;

public:
  Triangle() : a(0), b(0), c(0) {}
  Triangle(double a, double b, double c) : a(a), b(b), c(c) {}
  void setA(double a) { this->a = a; }
  void setB(double b) { this->b = b; }
  void setC(double c) { this->c = c; }
  double area() {
    double p = girth() / 2;
    return sqrt(p * (p - a) * (p - b) * (p - c));
  }
  double girth() { return a + b + c; }
  void show() {
    std::cout << "shape object: Triangle"
              << "\n"
              << "a: " << a << "\n"
              << "b: " << b << "\n"
              << "c: " << c << std::endl;
  }
};
#endif